<?php
namespace App\Services\ThirdPayments\BankTraits;

use App\Lib\BankMap;

trait WYZFBankMap
{
    private $bankMap = [
        BankMap::GONGSHANG       =>  'ICBC',
        BankMap::JIANSHE         =>  'CCB',
        BankMap::CHINABANK       =>  'BOCSH',
        BankMap::ZHAOSHANG       =>  'CMB',
        BankMap::ZHONGXIN        =>  'CNCB',
        BankMap::XINGYE          =>  'CIB',
        BankMap::GUANGDA         =>  'CEB',
        BankMap::NONGYE          =>  'ABC',
        BankMap::YOUZHEN         =>  'PSBC',
        BankMap::PUFA            =>  'SPDB',
        BankMap::GUANGFA         =>  'GDB',
        BankMap::MINSHENG        =>  'CMBC',
        BankMap::JIAOTONG        =>  'BOCOM',
        BankMap::HUAXIA          =>  'HXB',
        BankMap::SHANGHAI        =>  'BOS',
        BankMap::BEIJING         =>  'BCCB',
        BankMap::PINGAN          =>  'PAB',
    ];

    public function getBank($bankCode)
    {
        if (array_key_exists($bankCode, $this->bankMap)) return $this->bankMap[$bankCode];
        else return 'ICBC';
    }

}
